package com.neo.base.akkaActorTest



import scala.sys.process._
import scala.language.postfixOps
import java.net.URL
import java.io.File

object TestAkka{



  def findURL(url: String, filter: String) =
    new URL(url) #> s"grep $filter" #>> new File(s"$filter.txt")
  def countLines(fileName: String) = s"ls -l $fileName" #&& s"wc -l $fileName"

  def main(args: Array[String]): Unit = {
  val stodout = Seq("ls", "-l", "/home").!!
    println(stodout)
    findURL("https://www.baidu.com/", "baidu").!!
      countLines("baidu.txt").!
}
}

